package com.huawei.appmarket.service.appmgr.view.activity.fragment;

import android.app.Activity;
import android.app.Dialog;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.res.Configuration;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.AbsListView;
import android.widget.AbsListView.LayoutParams;
import android.widget.AbsListView.OnScrollListener;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.HeaderViewListAdapter;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.huawei.appgallery.foundation.account.bean.UserSession;
import com.huawei.appgallery.foundation.ui.framework.cardframe.fragment.TaskFragment;
import com.huawei.appmarket.service.appmgr.bean.ApkInstalledInfo;
import com.huawei.appmarket.service.appmgr.protocol.AppInstallFragmentProtocol;
import com.huawei.appmarket.service.appmgr.view.activity.EditInstalledListAdapter;
import com.huawei.appmarket.service.appmgr.view.activity.InstalledListAdapter;
import com.huawei.appmarket.service.appmgr.view.activity.InstalledListAdapter.d;
import com.huawei.hms.support.hianalytics.HiAnalyticsConstant;
import com.huawei.secure.android.common.intent.SafeBroadcastReceiver;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import o.ciy;
import o.BaseAlertDialog;
import o.cnw;
import o.cnz;
import o.coa;
import o.coe;
import o.dgh;
import o.Logger;
import o.dof;
import o.ContentManager;
import o.dsg;
import o.dtb;
import o.dtg;
import o.dvq;
import o.dwq;
import o.epw;
import o.CollectCheck;
import o.eqh;
import o.eqp;
import o.erm;
import o.etn;
import o.ActivityUtil;
import o.ewm.h;
import o.ewm.j;
import o.ewm.n;
import o.fho;
import o.fhz;
import o.ll;

public class AppInstallFragment extends TaskFragment<AppInstallFragmentProtocol> implements d, ciy {
    private BroadcastReceiver ʹ = new SafeBroadcastReceiver(this) {
        final /* synthetic */ AppInstallFragment ˋ;

        {
            this.ˋ = r1;
        }

        public void onReceiveMsg(Context context, Intent intent) {
            String action = intent.getAction();
            if (a.ˏ.equals(action)) {
                this.ˋ.ˋॱ(true);
            } else if (a.ˋ.equals(action)) {
                this.ˋ.ˋॱ(true);
            } else if (a.ˎ.equals(action) || o.epq.e.ˊ.equals(action)) {
                this.ˋ.ˋॱ(false);
            } else if (a.ॱ.equals(action)) {
                if (!this.ˋ.ˊʽ()) {
                    this.ˋ.ˏ.notifyDataSetChanged();
                }
            } else if ((dvq.ˏ().equals(action) || dvq.ˊ().equals(action)) && !this.ˋ.ˊʽ()) {
                this.ˋ.ˋʼ();
            }
        }
    };
    private b ʻˋ;
    private int ʼ;
    private boolean ʽ;
    private EditInstalledListAdapter ˊ;
    private View ˋ;
    private ListView ˎ;
    private InstalledListAdapter ˏ;
    private boolean ॱ;
    private BaseAlertDialog ॱॱ;
    private dsg ᐝ;
    private coa ﹳ;
    private boolean ﾞ = false;
    private dtb ﾟ = dtb.ॱ();

    static class b extends Handler {
        private WeakReference<AppInstallFragment> ˊ;

        private b(AppInstallFragment appInstallFragment) {
            this.ˊ = new WeakReference(appInstallFragment);
        }

        public void handleMessage(Message message) {
            AppInstallFragment appInstallFragment = (AppInstallFragment) this.ˊ.get();
            if (appInstallFragment != null) {
                appInstallFragment.ˋॱ(false);
            }
        }
    }

    public static class c {
        public double ˏ = 0.0d;
        public int ॱ = 0;
    }

    static class e implements OnScrollListener {
        private e() {
        }

        public void onScrollStateChanged(AbsListView absListView, int i) {
            if (i == 2) {
                erm.ˏ().ॱ(true);
            } else {
                erm.ˏ().ॱ(false);
            }
        }

        public void onScroll(AbsListView absListView, int i, int i2, int i3) {
        }
    }

    private void ˋʼ() {
        if (this.ʻˋ == null) {
            ˋॱ(false);
            return;
        }
        if (this.ʻˋ.hasMessages(1)) {
            this.ʻˋ.removeMessages(1);
        }
        this.ʻˋ.sendMessage(this.ʻˋ.obtainMessage(1));
    }

    public void ˏ(Bundle bundle) {
        super.ˏ(bundle);
        fhz ˋ = fho.ˏ().ˋ("PackageManager");
        if (ˋ != null) {
            this.ﹳ = (coa) ˋ.ॱ(coa.class);
        }
        AppInstallFragmentProtocol appInstallFragmentProtocol = (AppInstallFragmentProtocol) ˆ();
        if (!(appInstallFragmentProtocol == null || appInstallFragmentProtocol.ˊ() == null)) {
            this.ॱ = appInstallFragmentProtocol.ˊ().ˎ();
            this.ʽ = appInstallFragmentProtocol.ˊ().ˏ();
            this.ʼ = appInstallFragmentProtocol.ˊ().ॱ();
            this.ﾞ = appInstallFragmentProtocol.ˊ().ˋ();
        }
        this.ʻˋ = new b();
    }

    @Nullable
    public View ˋ(LayoutInflater layoutInflater, @Nullable ViewGroup viewGroup, Bundle bundle) {
        ViewGroup viewGroup2 = (ViewGroup) layoutInflater.inflate(h.ᐝˋ, viewGroup, false);
        viewGroup2.setBackgroundColor(ॱˋ().getResources().getColor(o.ewm.c.ॱˎ));
        ˊ(viewGroup2, this.ʽ);
        IntentFilter intentFilter = new IntentFilter();
        intentFilter.addAction(dvq.ˊ());
        intentFilter.addAction(dvq.ˏ());
        ॱˋ().registerReceiver(this.ʹ, intentFilter);
        intentFilter = new IntentFilter();
        intentFilter.addAction(a.ˎ);
        intentFilter.addAction(a.ˋ);
        intentFilter.addAction(a.ˏ);
        intentFilter.addAction(o.epq.e.ˊ);
        ll.ˏ(ContentManager.getInstant().getContext()).ˏ(this.ʹ, intentFilter);
        return viewGroup2;
    }

    public void onConfigurationChanged(Configuration configuration) {
        super.onConfigurationChanged(configuration);
    }

    private void ˊ(ViewGroup viewGroup, boolean z) {
        this.ˋ = viewGroup.findViewById(j.ᐧͺ);
        this.ˎ = (ListView) viewGroup.findViewById(j.ˉॱ);
        this.ˎ.setSelector(new ColorDrawable(0));
        this.ˎ.setOnScrollListener(new e());
        View view = new View(ॱˋ());
        view.setLayoutParams(new LayoutParams(-1, 0));
        this.ˎ.addHeaderView(view);
        this.ˊ = new EditInstalledListAdapter(ॱˋ(), this.ﾟ.ˏ(), this.ˋ);
        this.ˏ = new InstalledListAdapter(ॱˋ(), this.ˋ);
        this.ˏ.setISelectAppAction(this);
        this.ˏ.setData(this.ﾟ.ˏ(), dtb.ॱ().ʻ());
        this.ˏ.setSupportBatchUninstall(this.ॱ);
        Logger.ˎ("AppInstallFragment", "initView getAllInstalledAppList(): " + this.ﾟ.ˏ().size());
        if (z) {
            this.ˎ.setAdapter(this.ˊ);
            this.ˎ.setOnItemClickListener(new OnItemClickListener(this) {
                final /* synthetic */ AppInstallFragment ॱ;

                {
                    this.ॱ = r1;
                }

                public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
                    if (i > 0 && !this.ॱ.ˊ.requestInstalled.isEmpty() && i < this.ॱ.ˊ.requestInstalled.size() + 1) {
                        ApkInstalledInfo apkInstalledInfo = (ApkInstalledInfo) this.ॱ.ˊ.requestInstalled.get(i - 1);
                        if (this.ॱ.ˊ.selectPkg.containsKey(apkInstalledInfo.ॱ())) {
                            this.ॱ.ˊ.selectPkg.remove(apkInstalledInfo.ॱ());
                            Logger.ˎ("AppInstallFragment", "unselect pkg:" + apkInstalledInfo.ॱ());
                        } else {
                            this.ॱ.ˊ.selectPkg.put(apkInstalledInfo.ॱ(), Long.valueOf(apkInstalledInfo.ˏ()));
                            Logger.ˎ("AppInstallFragment", "select pkg:" + apkInstalledInfo.ॱ());
                        }
                        this.ॱ.ॱ();
                    }
                }
            });
        } else {
            this.ˎ.setAdapter(this.ˏ);
        }
        if (ॱˋ() instanceof dsg) {
            this.ᐝ = (dsg) ॱˋ();
        }
        if (this.ᐝ != null) {
            this.ᐝ.ˎ(z);
            this.ᐝ.ॱ(z);
        }
    }

    public void ˋ(int i) {
    }

    public void ʽˊ() {
    }

    public void ʾॱ() {
        if (this.ˎ != null) {
            this.ˎ.post(new Runnable(this) {
                final /* synthetic */ AppInstallFragment ˏ;

                {
                    this.ˏ = r1;
                }

                public void run() {
                    if (this.ˏ.ˎ != null) {
                        this.ˏ.ˎ.smoothScrollToPositionFromTop(0, 0);
                    }
                }
            });
        }
    }

    public void ˎ(String str, long j) {
        if (this.ˊ != null) {
            ॱˊ(true);
            if (!TextUtils.isEmpty(str)) {
                this.ˊ.addSelectPkg(str, j);
            }
            ͺ(true);
            if (this.ᐝ != null) {
                this.ᐝ.ˎ(true);
                this.ᐝ.ॱ(true);
            }
        }
    }

    public void ॱ() {
        if (ˊʽ()) {
            if (this.ᐝ != null) {
                this.ᐝ.ˎ(true);
                this.ᐝ.ॱ(true);
            }
            if (this.ˊ != null) {
                this.ˊ.notifyDataSetChanged();
            }
        }
    }

    public void ˋॱ(boolean z) {
        if (this.ˎ != null) {
            if (ˊʽ()) {
                ˋʽ();
            } else {
                ˋʻ();
            }
            if (z && this.ᐝ != null) {
                this.ᐝ.ˎ(this.ʽ);
            }
            if (this.ᐝ != null) {
                this.ᐝ.ॱ(this.ʽ);
            }
        }
    }

    private void ˋʻ() {
        if (this.ˏ != null) {
            ListAdapter adapter = this.ˎ.getAdapter();
            if (adapter instanceof HeaderViewListAdapter) {
                List ˏ = this.ﾟ.ˏ();
                this.ˏ.setDatas(ˏ, this.ﾟ.ʻ());
                Logger.ˎ("AppInstallFragment", "getAllInstalledAppList():" + ˏ.size());
                if (((HeaderViewListAdapter) adapter).getWrappedAdapter() instanceof InstalledListAdapter) {
                    this.ˏ.notifyDataSetChanged();
                    return;
                }
                int firstVisiblePosition = this.ˎ.getFirstVisiblePosition();
                View childAt = this.ˎ.getChildAt(0);
                int top = childAt == null ? 0 : childAt.getTop();
                this.ˎ.setAdapter(this.ˏ);
                this.ˎ.setSelectionFromTop(ॱ(firstVisiblePosition, ˏ) + firstVisiblePosition, top);
            }
        }
    }

    private void ˋʽ() {
        if (this.ˊ != null) {
            ͺ(false);
        }
    }

    private void ͺ(final boolean z) {
        ListAdapter adapter = this.ˎ.getAdapter();
        List ˏ = this.ﾟ.ˏ();
        this.ˊ.setDatas(ˏ);
        if (!(adapter instanceof HeaderViewListAdapter)) {
            return;
        }
        if (((HeaderViewListAdapter) adapter).getWrappedAdapter() instanceof EditInstalledListAdapter) {
            this.ˊ.notifyDataSetChanged();
            return;
        }
        int firstVisiblePosition = this.ˎ.getFirstVisiblePosition();
        View childAt = this.ˎ.getChildAt(0);
        int top = childAt == null ? 0 : childAt.getTop();
        int ॱ = ॱ(firstVisiblePosition, ˏ);
        this.ˎ.setAdapter(this.ˊ);
        this.ˎ.setSelectionFromTop(firstVisiblePosition - ॱ, top);
        this.ˎ.setOnItemClickListener(new OnItemClickListener(this) {
            boolean ˊ = true;
            final /* synthetic */ AppInstallFragment ˎ;

            public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
                if (!(z && this.ˊ) && i > 0 && !this.ˎ.ˊ.requestInstalled.isEmpty() && i < this.ˎ.ˊ.requestInstalled.size() + 1) {
                    ApkInstalledInfo apkInstalledInfo = (ApkInstalledInfo) this.ˎ.ˊ.requestInstalled.get(i - 1);
                    if (this.ˎ.ˊ.selectPkg.containsKey(apkInstalledInfo.ॱ())) {
                        this.ˎ.ˊ.selectPkg.remove(apkInstalledInfo.ॱ());
                        Logger.ˎ("AppInstallFragment", "unselect pkg:" + apkInstalledInfo.ॱ());
                    } else {
                        this.ˎ.ˊ.selectPkg.put(apkInstalledInfo.ॱ(), Long.valueOf(apkInstalledInfo.ˏ()));
                        Logger.ˎ("AppInstallFragment", "select pkg:" + apkInstalledInfo.ॱ());
                    }
                    this.ˎ.ॱ();
                }
                this.ˊ = false;
            }
        });
    }

    private int ॱ(int i, List<ApkInstalledInfo> list) {
        Collections.sort(list, new dtg());
        int i2 = 1;
        int i3 = 0;
        while (i3 < list.size() && i3 <= i) {
            if (!(this.ﹳ == null || this.ﹳ.ˎ(((ApkInstalledInfo) list.get(i3)).ॱ()) == cnz.ॱ)) {
                i2++;
            }
            i3++;
        }
        int ˋ = dtb.ॱ().ʻ().ˋ();
        if (ˋ > 0) {
            return i2 + (ˋ + 1);
        }
        return i2;
    }

    public void ᐝ() {
        super.ᐝ();
        if (this.ʹ != null) {
            try {
                ॱˋ().unregisterReceiver(this.ʹ);
            } catch (Exception e) {
                Logger.e("AppInstallFragment", "onDestroy() " + e.toString());
            }
            try {
                ll.ˏ(ContentManager.getInstant().getContext()).ˋ(this.ʹ);
            } catch (Exception e2) {
                Logger.e("AppInstallFragment", "onDestroy() " + e2.toString());
            }
        }
    }

    public void ˎˎ() {
        if (this.ˏ != null) {
            this.ˏ.onDestroy();
        }
        super.ˎˎ();
        if (this.ॱॱ != null) {
            try {
                this.ॱॱ.ˏ();
                this.ॱॱ = null;
            } catch (Exception e) {
                Logger.e("AppInstallFragment", "onDestroy() " + e.toString());
            }
        }
    }

    public void ʽᐝ() {
        String userId = UserSession.getInstance().getUserId();
        dgh.ॱ(ॱˋ(), "070606", "02|" + userId + HiAnalyticsConstant.REPORT_VAL_SEPARATOR + eqp.ॱ());
        ॱˊ(true);
        ˋॱ(true);
    }

    public void ʼᐝ() {
        ArrayList arrayList = new ArrayList(this.ﾟ.ˏ());
        Map hashMap = new HashMap();
        Iterator it = arrayList.iterator();
        while (it.hasNext()) {
            ApkInstalledInfo apkInstalledInfo = (ApkInstalledInfo) it.next();
            cnz o_cnz = cnz.ॱ;
            if (this.ﹳ != null) {
                o_cnz = this.ﹳ.ˎ(apkInstalledInfo.ॱ());
            }
            if (o_cnz == cnz.ॱ) {
                hashMap.put(apkInstalledInfo.ॱ(), Long.valueOf(apkInstalledInfo.ˏ()));
            }
        }
        if (this.ˊ != null) {
            this.ˊ.setSelectPkg(hashMap);
        }
        ॱ();
    }

    public void ˊʻ() {
        if (this.ˊ != null) {
            ˊ(ॱˋ(), new ArrayList(this.ˊ.getSelectPkg().keySet()));
        }
    }

    public void ˉॱ() {
        if (this.ˊ != null) {
            this.ˊ.clearSelectPkg();
        }
        ॱ();
    }

    public void ˊ(Activity activity, List<String> list) {
        List<ApkInstalledInfo> arrayList = new ArrayList(this.ﾟ.ˏ());
        List arrayList2 = new ArrayList();
        String str = "";
        int i = 0;
        for (ApkInstalledInfo apkInstalledInfo : arrayList) {
            int i2;
            if (list.contains(apkInstalledInfo.ॱ())) {
                arrayList2.add(apkInstalledInfo);
                if (apkInstalledInfo.ʽ()) {
                    i2 = 1;
                    i = i2;
                }
            }
            i2 = i;
            i = i2;
        }
        if (i != 0) {
            Object string = activity.getString(n.ˋˊ);
        } else {
            String str2 = str;
        }
        String str3 = "";
        str3 = "";
        Collections.sort(arrayList2, new dtg());
        if (arrayList2.size() > 0) {
            if (1 == arrayList2.size()) {
                str = activity.getString(n.ˊˊ, new Object[]{((ApkInstalledInfo) arrayList2.get(0)).ˎ()});
                str3 = activity.getString(n.ˊᐝ, new Object[]{((ApkInstalledInfo) arrayList2.get(0)).ˎ(), string});
                str2 = str;
            } else {
                str = activity.getResources().getQuantityString(i.ˊ, arrayList2.size(), new Object[]{((ApkInstalledInfo) arrayList2.get(0)).ˎ()});
                str3 = activity.getResources().getQuantityString(i.ʼ, arrayList2.size(), new Object[]{((ApkInstalledInfo) arrayList2.get(0)).ˎ(), Integer.valueOf(arrayList2.size()), string});
                str2 = str;
            }
            ˏ(activity, str2, str3, arrayList2);
        }
    }

    private void ˏ(Activity activity, String str, String str2, final List<ApkInstalledInfo> list) {
        if (!(this.ॱॱ == null || !this.ॱॱ.ˎ() || ActivityUtil.isAcitivtyNotValid(activity))) {
            this.ॱॱ.ˏ();
        }
        this.ॱॱ = BaseAlertDialog.ˋ(activity, null, str);
        ॱ(activity, str2, list);
        this.ॱॱ.ॱ();
        this.ॱॱ.ॱ(BaseAlertDialog.a.ˋ, activity.getString(n.ˉ));
        this.ॱॱ.ˊ(new OnClickListener(this) {
            final /* synthetic */ AppInstallFragment ˊ;

            public void onClick(View view) {
                boolean ˏ = ˏ(this.ˊ.ॱॱ);
                Logger.ˏ("AppInstallFragment", "batch uninstall onClick confirm,uninstallForAllUser is " + ˏ);
                for (ApkInstalledInfo apkInstalledInfo : list) {
                    int ˊ = etn.ˊ(0);
                    fhz ˋ = fho.ˏ().ˋ("PackageManager");
                    if (ˋ != null) {
                        cnw o_cnw = (cnw) ˋ.ॱ(cnw.class);
                        if (o_cnw != null) {
                            o_cnw.ˋ(ContentManager.getInstant().getContext(), new o.col.e().ॱ(apkInstalledInfo.ॱ()).ॱ(ˏ).ˏ(ˊ).ॱ(new coe(apkInstalledInfo.ˎ())).ˏ(dwq.ˊ).ॱ());
                        } else {
                            Logger.e("AppInstallFragment", "can not found IPackageInstaller Api");
                        }
                    } else {
                        Logger.e("AppInstallFragment", "can not found PackageManager module");
                    }
                }
                if (!ActivityUtil.isAcitivtyNotValid(this.ˊ.ॱˊ())) {
                    this.ˊ.ॱॱ.ˏ();
                }
                this.ˊ.ˊ.clearSelectPkg();
                this.ˊ.ॱˊ(false);
                ll.ˏ(ContentManager.getInstant().getContext()).ˋ(new Intent(a.ˏ));
            }

            private boolean ˏ(BaseAlertDialog o_ckr) {
                Dialog ˋ = o_ckr.ˋ();
                if (ˋ != null) {
                    CheckBox checkBox = (CheckBox) ˋ.findViewById(j.ᶫ);
                    if (checkBox != null) {
                        return checkBox.isChecked();
                    }
                }
                return false;
            }
        });
    }

    private void ॱ(Activity activity, String str, final List<ApkInstalledInfo> list) {
        eqh ˎ = eqh.ˎ();
        if (!ˎ.ˏ()) {
            this.ॱॱ.ˊ(ˎ(activity, str, ˎ));
        } else if (ˎ.ॱ() != 1 || ॱ((List) list)) {
            boolean z;
            View inflate = LayoutInflater.from(activity).inflate(h.ˊˑ, null);
            TextView textView = (TextView) inflate.findViewById(j.ˈﾟ);
            CheckBox checkBox = (CheckBox) inflate.findViewById(j.ᶫ);
            checkBox.setOnCheckedChangeListener(new OnCheckedChangeListener(this) {
                final /* synthetic */ AppInstallFragment ˊ;

                public void onCheckedChanged(CompoundButton compoundButton, boolean z) {
                    Object obj;
                    for (ApkInstalledInfo ʽ : list) {
                        if (ʽ.ʽ()) {
                            obj = 1;
                            break;
                        }
                    }
                    obj = null;
                    if (obj == null) {
                        this.ˊ.ॱॱ.ˏ(z);
                    }
                }
            });
            textView.setText(str);
            for (ApkInstalledInfo ʽ : list) {
                if (ʽ.ʽ()) {
                    z = true;
                    break;
                }
            }
            z = false;
            if (!z) {
                checkBox.setChecked(true);
                this.ॱॱ.ˏ(true);
            }
            this.ॱॱ.ˊ(inflate);
        }
    }

    @NonNull
    private View ˎ(Activity activity, String str, eqh o_eqh) {
        View inflate = LayoutInflater.from(activity).inflate(h.ˊˉ, null);
        ((TextView) inflate.findViewById(j.ˈﾟ)).setText(str);
        TextView textView = (TextView) inflate.findViewById(j.ˉʾ);
        String ˋ = o_eqh.ˋ(activity, 0);
        if (TextUtils.isEmpty(ˋ)) {
            ˋ = dof.ʼ(ˋ);
        } else {
            ˋ = "\"" + ˋ + "\"";
        }
        textView.setText(activity.getString(n.ˋᵔ, new Object[]{ˋ}));
        return inflate;
    }

    private boolean ॱ(List<ApkInstalledInfo> list) {
        if (CollectCheck.isEmpty(list)) {
            return false;
        }
        for (ApkInstalledInfo ʽ : list) {
            if (!ʽ.ʽ()) {
                return true;
            }
        }
        return false;
    }

    public c ˊʼ() {
        c cVar = new c();
        if (this.ˊ != null) {
            ConcurrentHashMap selectPkg = this.ˊ.getSelectPkg();
            for (Entry key : selectPkg.entrySet()) {
                cVar.ˏ += epw.ˋ(((Long) selectPkg.get(key.getKey())).longValue());
                cVar.ॱ++;
            }
        }
        return cVar;
    }

    public void ʿॱ() {
        if (this.ˊ != null) {
            this.ˊ.clearSelectPkg();
        }
    }

    public Map<String, Long> ˈॱ() {
        if (this.ˊ != null) {
            return this.ˊ.getSelectPkg();
        }
        return null;
    }

    public boolean ˌॱ() {
        ArrayList arrayList = new ArrayList(this.ﾟ.ˏ());
        if (this.ˊ != null) {
            Set keySet = this.ˊ.getSelectPkg().keySet();
            Iterator it = arrayList.iterator();
            while (it.hasNext()) {
                ApkInstalledInfo apkInstalledInfo = (ApkInstalledInfo) it.next();
                cnz o_cnz = cnz.ॱ;
                if (this.ﹳ != null) {
                    o_cnz = this.ﹳ.ˎ(apkInstalledInfo.ॱ());
                }
                if (!keySet.contains(apkInstalledInfo.ॱ()) && r1 == cnz.ॱ) {
                    return false;
                }
            }
        }
        return true;
    }

    public boolean ˊʽ() {
        return this.ʽ;
    }

    public void ॱˊ(boolean z) {
        this.ʽ = z;
    }
}
